﻿using System;
using System.Collections;
using System.IO;
using BaseSyntax.Collection.AnimalBase;

namespace BaseSyntax.Collection.DictionaryBaseTest
{
	public class Animals:DictionaryBase
	{
		public void Add(string id, Animal animal)
		{
			Dictionary.Add(id, animal);
		}

		public void Remove(string id)
		{
			Dictionary.Remove(id);
		}
		
		public Animal this[string id]
		{
			get
			{
				return (Animal)Dictionary[id];
			}
			set
			{
				Dictionary[id] = value;
			}
		}

		public void EnuratorValue()
		{
			foreach (DictionaryEntry entry in Dictionary)
			{
				((Animal) entry.Value).Feed();
			}
		}
	}
}